package net.crunis.kindle_tools;

import java.io.BufferedOutputStream;

import com.Ostermiller.util.CircularByteBuffer;

public class TestCircBuff {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// Create the buffer.
		CircularByteBuffer cbb = new CircularByteBuffer();

		try {
		// Fill the buffer.
		//BufferedOutputStream output = new BufferedOutputStream(cbb.getOutputStream());
		//output.write(new String("Hello, World!").getBytes());
		//output.close();
		cbb.getOutputStream().write(new String("Hello, World!").getBytes());
		cbb.getOutputStream().close();

		// Empty the buffer.
		int c;
		while ((c = cbb.getInputStream().read()) != -1){
		    System.out.print((char)c);
		}
		}
		catch (Exception e) {
		
		}
	}

}
